<!DOCTYPE html>

<html>

<head>

    <meta charset="utf-8">

    <!--    <meta http-equiv="refresh" content="3">-->

    <title>增加浏览量</title>

</head>

<body>
    <h1>
        刷新次数：<span id="times"></span>
    </h1>
    <h1>
        本次等待：<span id="sleep_millis"></span> 毫秒
    </h1>

    <iframe id="changan" frameborder=1 scrolling=yes width="100%" height=500px
        src=https://home.changan.com.cn/share/#/info_details?id=169683&sharer=94077></iframe>

</body>

<script>
    // var millis = 300 + Math.round(Math.random() * 1 * 700)
    var millis = 1000
    document.getElementById("times").innerText = window.localStorage.getItem('times4');
    document.getElementById("sleep_millis").innerText = millis;
    function flush() {
        var times = window.localStorage.getItem('times4');
        console.log(times)
        if (times == undefined) {
            times = 1
        } else {
            times++;
        }
        window.localStorage.setItem('times4', times);
        console.log('间隔:', millis);
        location.reload()
    }
    if (window.localStorage.getItem('times4') < 4000) {
        setTimeout(flush, millis);
    }
</script>


</html>